<template>
<div class="">
    <input type="text" @keyup.enter.exact="getMsg">
    <button v-on:click.left.prevent="show('捕获鼠标左键')">按钮</button>
</div>
</template>

<script setup>
import { ref } from 'vue';

const getMsg = () =>{
    console.log("enter");
}
let show = message =>console.log(message);

</script>

<style scoped></style>